package com.linwl.plume.service.impl;

import com.linwl.plume.service.TestService;
import com.plumelog.core.TraceId;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

/**
 * @className: TestServiceImpl
 * @author: linwl
 * @desc:
 * @date: 2025/2/7
 **/
@Service
public class TestServiceImpl implements TestService {

    private Logger logger = LoggerFactory.getLogger(this.getClass());

    @Override
    public String test() {
        logger.info("This is an info log with trace ID:{}", TraceId.logTraceID.get());
        logger.error("This is an error log with trace ID:", TraceId.logTraceID.get());

        return "Logged successfully!";
    }
}
